package work4.tcp;

import java.io.Serializable;

/**
 *
 * UserMessage 类的特征有：类型(字符串类型) 和 用户对象(User 类型)。
 *
 *   其中 User 类的特征有：用户名、密码(字符串类型)。
 *
 * */
public class UserMessage implements Serializable {
    private String status;
    private User user;

    public UserMessage(String status, User user) {
        this.status = status;
        this.user = user;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public static class User implements Serializable{
        private String account;
        private String password;

       public User(String account, String password) {
           this.account = account;
           this.password = password;
       }

       public String getAccount() {
           return account;
       }

       public void setAccount(String account) {
           this.account = account;
       }

       public String getPassword() {
           return password;
       }

       public void setPassword(String password) {
           this.password = password;
       }
   }
}
